DDD の trilemma
Specification pattern in the DDD trilemma · Vladimir Khorikov
単体テストの考え方/使い方 | Vladimir Khorikov, 須田智之 |本 | 通販 | Amazon
Domain model purity vs. domain model completeness (DDD Trilemma) · Enterprise Craftsmanship
/kawasima/ドメインモデルの完全性と純粋性
/iki-iki/DDDトリレンマ
アーキ部:強いて言えば「集約どう実装するのかな、を考える」会に参加してきた! - そこに仁義はあるのか(仮)
trilemma
model の完全性 (domain model encapsulation (a.k.a. completeness))
When all the application’s domain logic is located in the domain layer, i.e. not fragmented.
application の demain logic が、domain layer 等の 1 箇所に纏まって記述される
model の純粹性 (domain model purity)
When the domain layer doesn’t have out-of-process dependencies.
domain layer が外部に依存しない
application の性能 (performance)
which is defined by the presence of unnecessary calls to out-of-process dependencies.
外部に依存した不要な處理を呼び出さない
可能な道
完全性 + 純粹性 : Push all external reads and writes to the edges of a business operation
外部の讀み書きを全て business 作業の境界へ追ひ遣る
完全性 + 性能 : Inject out-of-process dependencies into the domain model
外部への依存を依存性の注入 (DI)する
純粹性 + 性能 : Split the decision-making process between the domain layer and controllers
With this approach, you need to introduce decision-making points (business logic) in the controller.
decision-making な處理を domain layer と controller とに分割する
MVC (model - view - controller)